package com.gxkj.projects.myshopx.entitys;

import com.gxkj.common.validate.Update;
import com.gxkj.projects.myshopx.enums.DbConfigTypeEnum;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Entity
@Table(name = "db_config")
public class DbConfig  implements Serializable {

    private static final long serialVersionUID = -4454655464679745142L;
    @Id
    @GenericGenerator(name="systemUUID",strategy="uuid")
    @GeneratedValue(generator="systemUUID")
    @Column(name = "id")
    private String id;

    @Column(name="pro_name",nullable = false)
    @NotEmpty(message = "{DbConfig.proName.null}" )
    private String proName;//属性名

    @Column(name="pro_desc",nullable = true)
    private String proDesc;//属性描述

    @Column(name="pro_value",nullable = false)
    @NotEmpty(message = "{DbConfig.proValue.null}" )
    private String proValue;//属性值

    @Column(name="pro_type",nullable = false)
    @Enumerated(EnumType.STRING)
    @NotNull(message = "{DbConfig.proType.null}" )
    private DbConfigTypeEnum proType;//属性类型

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public String getProDesc() {
        return proDesc;
    }

    public void setProDesc(String proDesc) {
        this.proDesc = proDesc;
    }

    public String getProValue() {
        return proValue;
    }

    public void setProValue(String proValue) {
        this.proValue = proValue;
    }

    public DbConfigTypeEnum getProType() {
        return proType;
    }

    public void setProType(DbConfigTypeEnum proType) {
        this.proType = proType;
    }
}
